package cn.lanqiao.aop.impl;

import cn.lanqiao.aop.TargetInterface;
import org.springframework.stereotype.Component;

@Component
public class Target implements TargetInterface {

    @Override
    public void save() {
        System.out.println("AOP的代理的目标对象执行...");
    }

    @Override
    public String update() {
        System.out.println("执行方法更新...");
        return "更新成功";
    }

    @Override
    public String delete() {
        System.out.println("正在删除...");
        return "删除成功";
    }

    @Override
    public void query() throws IndexOutOfBoundsException{
        int[] arr = new int[2];
        System.out.println("查询到..." + arr[2]);
    }

}
